import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AppLayoutComponent } from 'src/layout/app.layout.component';
import { NotfoundComponent } from './notfound/notfound.component';

const routes: Routes = [
  {
    path: '', component: AppLayoutComponent, children: [
      // {
      //   path: '',
      //   loadChildren: () => import('src/components/dashboard/dashboard.module').then(m => m.DashboardModule)
      // },
      {
        path: 'scenarios',
        loadChildren: () => import('src/components/scenarios/scenarios.module').then(m => m.ScenariosModule)
      },
      {
        path: 'flow-graph', 
        loadChildren: () => import('src/components/flow-graph/flow-graph.module').then(m => m.FlowGraphModule)
      },
    ]
  },
  {
    path: 'kanban',
    loadChildren: () => import('src/kanban/kanban.module').then(m => m.KanbanModule)
  },
  // {
  //   path: 'auth',
  //   loadChildren: () => import('src/components/auth/auth.module').then(m => m.AuthModule)
  // },
  { path: 'notfound', component: NotfoundComponent },
  { path: '**', redirectTo: '/scenarios/list' },
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: 'enabled', anchorScrolling: 'enabled', onSameUrlNavigation: 'reload' })],
  exports: [RouterModule]
})
export class AppRoutingModule { }
